3.2168 \(\int \frac{1+x+x^2}{x} \, dx\)

Optimal. Leaf size=11 \[ \frac{x^2}{2}+x+\log (x) \]

[Out]

x + x^2/2 + Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.00896016, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1 \[ \frac{x^2}{2}+x+\log (x) \]

Antiderivative was successfully verified.

[In]  Int[(1 + x + x^2)/x,x]

[Out]

x + x^2/2 + Log[x]

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ x + \log{\left (x \right )} + \int x\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**2+x+1)/x,x)

[Out]

x + log(x) + Integral(x, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00171479, size = 11, normalized size = 1. \[ \frac{x^2}{2}+x+\log (x) \]

Antiderivative was successfully verified.

[In]  Integrate[(1 + x + x^2)/x,x]

[Out]

x + x^2/2 + Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 10, normalized size = 0.9 \[ x+{\frac{{x}^{2}}{2}}+\ln \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2+x+1)/x,x)

[Out]

x+1/2*x^2+ln(x)

_______________________________________________________________________________________

Maxima [A]  time = 0.807257, size = 12, normalized size = 1.09 \[ \frac{1}{2} \, x^{2} + x + \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + x + 1)/x,x, algorithm="maxima")

[Out]

1/2*x^2 + x + log(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.217815, size = 12, normalized size = 1.09 \[ \frac{1}{2} \, x^{2} + x + \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + x + 1)/x,x, algorithm="fricas")

[Out]

1/2*x^2 + x + log(x)

_______________________________________________________________________________________

Sympy [A]  time = 0.124164, size = 8, normalized size = 0.73 \[ \frac{x^{2}}{2} + x + \log{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2+x+1)/x,x)

[Out]

x**2/2 + x + log(x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.20474, size = 14, normalized size = 1.27 \[ \frac{1}{2} \, x^{2} + x +{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + x + 1)/x,x, algorithm="giac")

[Out]

1/2*x^2 + x + ln(abs(x))